# Makefile for c test.
#

SRCS += $(wildcard *.c)
TARGETS = $(foreach src, $(SRCS), $(basename $(src)) )

CC =gcc
CFLAGS += -pipe -Wall -g
CFLAGS += 

# CFLAGS += $(shell xml2-config --cflags)
CDFLAGS += -lm -lrt
# CDFLAGS += $(shell xml2-config --libs)
# CDFLAGS += -lssl

.PHONY : all clean

all : $(TARGETS)

$(TARGETS) : % : %.o 
	    g++ $(CFLAGS) $(CDFLAGS) -o $@ $<


clean :
	    -rm $(TARGETS) *.o

##################################

.SUFFIXES : .c

.c.o :
	    $(CC) $(CFLAGS) -c -o $@ $<
